package com.xyz.frame.api.service;

import org.springframework.web.multipart.MultipartFile;

import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author zsr
 * @date 2021/6/9 21:15
 */
public interface OssService {
    String uploadFileAvatar(MultipartFile file);

    //上传图片到服务器目录：/tmp/upload/images/
    //文件名称使用时间戳代替
    //返回图片路径：http://127.0.0.1:8000/tmp/upload/images/2021/06/09/xxxx.png
    String uploadFileAvatarLocal(MultipartFile file);

    void getLocalImage(String localPath, HttpServletResponse response) throws IOException;

    void getLocalVideo(String localPath, HttpServletResponse response) throws IOException;

    String uploadCourseFile(MultipartFile file);

    void getLocalFile(String localPath, HttpServletResponse response) throws IOException;
}
